package com.dt76.smallloanbackenduser.remote.xm;


import com.dt76.smallloanbackenduser.hystrix.xm.BeforeOrderHystrix;
import com.dt76.smallloanbackenduser.pojo.xm.BeforeOrder;
import com.dt76.smallloanbackenduser.pojo.xm.BeforeOrderQuery;
import com.dt76.smallloanbackenduser.utils.Page;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "smallloan-backend-service",fallback = BeforeOrderHystrix.class)
public interface BeforeOrderRemote {

    @RequestMapping("/xm/qryAll")
    List<BeforeOrder> qryAll();

    @PostMapping(value = "/xm/qryPageConditionAll",consumes = "application/json")
    Page qryPageConditionAll(@RequestParam("currentPageNo")Integer currentPageNo,@RequestBody BeforeOrderQuery beforeOrderQuery);

    @PostMapping(value = "/xm/qryPageConditionAll2",consumes = "application/json")
    Page qryPageConditionAll2(@RequestParam("currentPageNo")Integer currentPageNo,@RequestBody BeforeOrderQuery beforeOrderQuery);

    @RequestMapping("/xm/BeforeOrder/qryByID")
    BeforeOrder qryByID(@RequestParam("id") int id);

    @PostMapping(value = "/xm/BeforeOrder/modifyBeforeOrderType",consumes = "application/json")
    int modifyBeforeOrderType(@RequestBody BeforeOrder beforeOrder);
}
